<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.16"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Livox SDK API: sdk_core/include/third_party/spdlog/spdlog/details/fmt_helper.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  $(document).ready(initResizable);
/* @license-end */</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="1.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Livox SDK API
   &#160;<span id="projectnumber">V2.0.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.16 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('fmt__helper_8h_source.html','');});
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">fmt_helper.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="fmt__helper_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">//</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment">// Created by gabi on 6/15/18.</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment">//</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160; </div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="preprocessor">#pragma once</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160; </div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="preprocessor">#include &lt;chrono&gt;</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="preprocessor">#include &lt;type_traits&gt;</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="fmt_8h.html">spdlog/fmt/fmt.h</a>&quot;</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160; </div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment">// Some fmt helpers to efficiently format and pad ints and strings</span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespacespdlog.html">spdlog</a> {</div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="keyword">namespace </span>details {</div>
<div class="line"><a name="l00014"></a><span class="lineno"><a class="line" href="namespacespdlog_1_1details_1_1fmt__helper.html">   14</a></span>&#160;<span class="keyword">namespace </span>fmt_helper {</div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160; </div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="keyword">template</span>&lt;<span class="keywordtype">size_t</span> Buffer_Size&gt;</div>
<div class="line"><a name="l00017"></a><span class="lineno"><a class="line" href="namespacespdlog_1_1details_1_1fmt__helper.html#aa2b4191cb8c40474fb61787ad67face5">   17</a></span>&#160;<span class="keyword">inline</span> <a class="code" href="classfmt_1_1v5_1_1basic__string__view.html">spdlog::string_view_t</a> <a class="code" href="namespacespdlog_1_1details_1_1fmt__helper.html#aa2b4191cb8c40474fb61787ad67face5">to_string_view</a>(<span class="keyword">const</span> <a class="code" href="classfmt_1_1v5_1_1basic__memory__buffer.html">fmt::basic_memory_buffer&lt;char, Buffer_Size&gt;</a> &amp;buf) <a class="code" href="common_8h.html#a15d2dc432e6bb83beb5130be9a4ca8d6">SPDLOG_NOEXCEPT</a></div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;{</div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="namespacespdlog.html#af48e310b2f366ac6544701e6a3b56247">spdlog::string_view_t</a>(buf.data(), buf.size());</div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;}</div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160; </div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="keyword">template</span>&lt;<span class="keywordtype">size_t</span> Buffer_Size1, <span class="keywordtype">size_t</span> Buffer_Size2&gt;</div>
<div class="line"><a name="l00023"></a><span class="lineno"><a class="line" href="namespacespdlog_1_1details_1_1fmt__helper.html#a1cd64e7ba833d726c77344aa9fb85e6a">   23</a></span>&#160;<span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="namespacespdlog_1_1details_1_1fmt__helper.html#a1cd64e7ba833d726c77344aa9fb85e6a">append_buf</a>(<span class="keyword">const</span> <a class="code" href="classfmt_1_1v5_1_1basic__memory__buffer.html">fmt::basic_memory_buffer&lt;char, Buffer_Size1&gt;</a> &amp;buf, <a class="code" href="classfmt_1_1v5_1_1basic__memory__buffer.html">fmt::basic_memory_buffer&lt;char, Buffer_Size2&gt;</a> &amp;dest)</div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;{</div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;    <span class="keyword">auto</span> *buf_ptr = buf.<a class="code" href="classfmt_1_1v5_1_1internal_1_1basic__buffer.html#a384f1304da6ce18c4713368327354479">data</a>();</div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;    dest.<a class="code" href="classfmt_1_1v5_1_1internal_1_1basic__buffer.html#a5c6d1a6230a4c8e713244bbdd63a1a24">append</a>(buf_ptr, buf_ptr + buf.<a class="code" href="classfmt_1_1v5_1_1internal_1_1basic__buffer.html#ac4761deba75a7238ae29243b159b9943">size</a>());</div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;}</div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160; </div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;<span class="keyword">template</span>&lt;<span class="keywordtype">size_t</span> Buffer_Size&gt;</div>
<div class="line"><a name="l00030"></a><span class="lineno"><a class="line" href="namespacespdlog_1_1details_1_1fmt__helper.html#a603f4d0d8853a61610a0042d5d62fe94">   30</a></span>&#160;<span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="namespacespdlog_1_1details_1_1fmt__helper.html#a603f4d0d8853a61610a0042d5d62fe94">append_string_view</a>(<a class="code" href="classfmt_1_1v5_1_1basic__string__view.html">spdlog::string_view_t</a> view, <a class="code" href="classfmt_1_1v5_1_1basic__memory__buffer.html">fmt::basic_memory_buffer&lt;char, Buffer_Size&gt;</a> &amp;dest)</div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;{</div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;    <span class="keyword">auto</span> *buf_ptr = view.<a class="code" href="classfmt_1_1v5_1_1basic__string__view.html#a517e9e8fc58c52c7816fa647d5e69f9f">data</a>();</div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;    <span class="keywordflow">if</span> (buf_ptr != <span class="keyword">nullptr</span>)</div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;    {</div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;        dest.<a class="code" href="classfmt_1_1v5_1_1internal_1_1basic__buffer.html#a5c6d1a6230a4c8e713244bbdd63a1a24">append</a>(buf_ptr, buf_ptr + view.<a class="code" href="classfmt_1_1v5_1_1basic__string__view.html#abd82d74b110d5d4f52e0282e4d11fc99">size</a>());</div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;    }</div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;}</div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160; </div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">typename</span> T, <span class="keywordtype">size_t</span> Buffer_Size&gt;</div>
<div class="line"><a name="l00040"></a><span class="lineno"><a class="line" href="namespacespdlog_1_1details_1_1fmt__helper.html#a0d2621043fa718e54ffcaa2e9812dfa4">   40</a></span>&#160;<span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="namespacespdlog_1_1details_1_1fmt__helper.html#a0d2621043fa718e54ffcaa2e9812dfa4">append_int</a>(T n, <a class="code" href="classfmt_1_1v5_1_1basic__memory__buffer.html">fmt::basic_memory_buffer&lt;char, Buffer_Size&gt;</a> &amp;dest)</div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;{</div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;    <a class="code" href="classfmt_1_1v5_1_1format__int.html">fmt::format_int</a> i(n);</div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;    dest.<a class="code" href="classfmt_1_1v5_1_1internal_1_1basic__buffer.html#a5c6d1a6230a4c8e713244bbdd63a1a24">append</a>(i.<a class="code" href="classfmt_1_1v5_1_1format__int.html#afde6e35fd703a48b346c0dd969bd6b1c">data</a>(), i.<a class="code" href="classfmt_1_1v5_1_1format__int.html#afde6e35fd703a48b346c0dd969bd6b1c">data</a>() + i.<a class="code" href="classfmt_1_1v5_1_1format__int.html#abe5d90acec7245e6cd0c5d49b4e57f3e">size</a>());</div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;}</div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160; </div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;</div>
<div class="line"><a name="l00047"></a><span class="lineno"><a class="line" href="namespacespdlog_1_1details_1_1fmt__helper.html#a976eeb3c4a42ccfb05437aa9a0d4d9f7">   47</a></span>&#160;<span class="keyword">inline</span> <span class="keywordtype">unsigned</span> <a class="code" href="namespacespdlog_1_1details_1_1fmt__helper.html#a976eeb3c4a42ccfb05437aa9a0d4d9f7">count_digits</a>(T n)</div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;{</div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;    <span class="keyword">using</span> count_type = <span class="keyword">typename</span> std::conditional&lt;(<span class="keyword">sizeof</span>(T) &gt; <span class="keyword">sizeof</span>(uint32_t)), uint64_t, uint32_t&gt;::<a class="code" href="namespacefmt_1_1v5_1_1internal.html#af8b98afef956b03a99bc61d088705f13">type</a>;</div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;    <span class="keywordflow">return</span> static_cast&lt;unsigned&gt;(<a class="code" href="namespacespdlog_1_1details_1_1fmt__helper.html#a976eeb3c4a42ccfb05437aa9a0d4d9f7">fmt::internal::count_digits</a>(static_cast&lt;count_type&gt;(n)));</div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;}</div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160; </div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;<span class="keyword">template</span>&lt;<span class="keywordtype">size_t</span> Buffer_Size&gt;</div>
<div class="line"><a name="l00054"></a><span class="lineno"><a class="line" href="namespacespdlog_1_1details_1_1fmt__helper.html#ae8d7b70c5b54338c0903cf494b06404a">   54</a></span>&#160;<span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="namespacespdlog_1_1details_1_1fmt__helper.html#ae8d7b70c5b54338c0903cf494b06404a">pad2</a>(<span class="keywordtype">int</span> n, <a class="code" href="classfmt_1_1v5_1_1basic__memory__buffer.html">fmt::basic_memory_buffer&lt;char, Buffer_Size&gt;</a> &amp;dest)</div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;{</div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;    <span class="keywordflow">if</span> (n &gt; 99)</div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;    {</div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;        <a class="code" href="namespacespdlog_1_1details_1_1fmt__helper.html#a0d2621043fa718e54ffcaa2e9812dfa4">append_int</a>(n, dest);</div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;    }</div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;    <span class="keywordflow">else</span> <span class="keywordflow">if</span> (n &gt; 9) <span class="comment">// 10-99</span></div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;    {</div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;        dest.<a class="code" href="classfmt_1_1v5_1_1internal_1_1basic__buffer.html#a8e3b65c01dadb977b9c2327864db9e15">push_back</a>(static_cast&lt;char&gt;(<span class="charliteral">&#39;0&#39;</span> + n / 10));</div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;        dest.<a class="code" href="classfmt_1_1v5_1_1internal_1_1basic__buffer.html#a8e3b65c01dadb977b9c2327864db9e15">push_back</a>(static_cast&lt;char&gt;(<span class="charliteral">&#39;0&#39;</span> + n % 10));</div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;    }</div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;    <span class="keywordflow">else</span> <span class="keywordflow">if</span> (n &gt;= 0) <span class="comment">// 0-9</span></div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;    {</div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;        dest.<a class="code" href="classfmt_1_1v5_1_1internal_1_1basic__buffer.html#a8e3b65c01dadb977b9c2327864db9e15">push_back</a>(<span class="charliteral">&#39;0&#39;</span>);</div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;        dest.<a class="code" href="classfmt_1_1v5_1_1internal_1_1basic__buffer.html#a8e3b65c01dadb977b9c2327864db9e15">push_back</a>(static_cast&lt;char&gt;(<span class="charliteral">&#39;0&#39;</span> + n));</div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;    }</div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;    <span class="keywordflow">else</span> <span class="comment">// negatives (unlikely, but just in case, let fmt deal with it)</span></div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;    {</div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;        <a class="code" href="namespacefmt_1_1v5.html#a253206334a77520a94a72af63516dabd">fmt::format_to</a>(dest, <span class="stringliteral">&quot;{:02}&quot;</span>, n);</div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;    }</div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;}</div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160; </div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">typename</span> T, <span class="keywordtype">size_t</span> Buffer_Size&gt;</div>
<div class="line"><a name="l00077"></a><span class="lineno"><a class="line" href="namespacespdlog_1_1details_1_1fmt__helper.html#a569553750f9f2fa7b16c94a56a398de3">   77</a></span>&#160;<span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="namespacespdlog_1_1details_1_1fmt__helper.html#a569553750f9f2fa7b16c94a56a398de3">pad_uint</a>(T n, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> width, <a class="code" href="classfmt_1_1v5_1_1basic__memory__buffer.html">fmt::basic_memory_buffer&lt;char, Buffer_Size&gt;</a> &amp;dest)</div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;{</div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;    static_assert(std::is_unsigned&lt;T&gt;::value, <span class="stringliteral">&quot;pad_uint must get unsigned T&quot;</span>);</div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;    <span class="keyword">auto</span> digits = <a class="code" href="namespacespdlog_1_1details_1_1fmt__helper.html#a976eeb3c4a42ccfb05437aa9a0d4d9f7">count_digits</a>(n);</div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;    <span class="keywordflow">if</span> (width &gt; digits)</div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;    {</div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;        <span class="keyword">const</span> <span class="keywordtype">char</span> *zeroes = <span class="stringliteral">&quot;0000000000000000000&quot;</span>;</div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;        dest.<a class="code" href="classfmt_1_1v5_1_1internal_1_1basic__buffer.html#a5c6d1a6230a4c8e713244bbdd63a1a24">append</a>(zeroes, zeroes + width - digits);</div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;    }</div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;    <a class="code" href="namespacespdlog_1_1details_1_1fmt__helper.html#a0d2621043fa718e54ffcaa2e9812dfa4">append_int</a>(n, dest);</div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;}</div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160; </div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">typename</span> T, <span class="keywordtype">size_t</span> Buffer_Size&gt;</div>
<div class="line"><a name="l00090"></a><span class="lineno"><a class="line" href="namespacespdlog_1_1details_1_1fmt__helper.html#af739ecce102d47ff08a0f344a96897d9">   90</a></span>&#160;<span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="namespacespdlog_1_1details_1_1fmt__helper.html#af739ecce102d47ff08a0f344a96897d9">pad3</a>(T n, <a class="code" href="classfmt_1_1v5_1_1basic__memory__buffer.html">fmt::basic_memory_buffer&lt;char, Buffer_Size&gt;</a> &amp;dest)</div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;{</div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;    <a class="code" href="namespacespdlog_1_1details_1_1fmt__helper.html#a569553750f9f2fa7b16c94a56a398de3">pad_uint</a>(n, 3, dest);</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;}</div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160; </div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">typename</span> T, <span class="keywordtype">size_t</span> Buffer_Size&gt;</div>
<div class="line"><a name="l00096"></a><span class="lineno"><a class="line" href="namespacespdlog_1_1details_1_1fmt__helper.html#aefae60b1ebdae78bc8f11c26b36b2cd6">   96</a></span>&#160;<span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="namespacespdlog_1_1details_1_1fmt__helper.html#aefae60b1ebdae78bc8f11c26b36b2cd6">pad6</a>(T n, <a class="code" href="classfmt_1_1v5_1_1basic__memory__buffer.html">fmt::basic_memory_buffer&lt;char, Buffer_Size&gt;</a> &amp;dest)</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;{</div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;    <a class="code" href="namespacespdlog_1_1details_1_1fmt__helper.html#a569553750f9f2fa7b16c94a56a398de3">pad_uint</a>(n, 6, dest);</div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;}</div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160; </div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">typename</span> T, <span class="keywordtype">size_t</span> Buffer_Size&gt;</div>
<div class="line"><a name="l00102"></a><span class="lineno"><a class="line" href="namespacespdlog_1_1details_1_1fmt__helper.html#aad467c706932b56929dae091b39c23f3">  102</a></span>&#160;<span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="namespacespdlog_1_1details_1_1fmt__helper.html#aad467c706932b56929dae091b39c23f3">pad9</a>(T n, <a class="code" href="classfmt_1_1v5_1_1basic__memory__buffer.html">fmt::basic_memory_buffer&lt;char, Buffer_Size&gt;</a> &amp;dest)</div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;{</div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;    <a class="code" href="namespacespdlog_1_1details_1_1fmt__helper.html#a569553750f9f2fa7b16c94a56a398de3">pad_uint</a>(n, 9, dest);</div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;}</div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160; </div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;<span class="comment">// return fraction of a second of the given time_point.</span></div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;<span class="comment">// e.g.</span></div>
<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;<span class="comment">// fraction&lt;std::milliseconds&gt;(tp) -&gt; will return the millis part of the second</span></div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">typename</span> ToDuration&gt;</div>
<div class="line"><a name="l00111"></a><span class="lineno"><a class="line" href="namespacespdlog_1_1details_1_1fmt__helper.html#a27585b20ce58cd861f4e37be0057cc41">  111</a></span>&#160;<span class="keyword">inline</span> ToDuration <a class="code" href="namespacespdlog_1_1details_1_1fmt__helper.html#a27585b20ce58cd861f4e37be0057cc41">time_fraction</a>(<span class="keyword">const</span> log_clock::time_point &amp;tp)</div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;{</div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;    <span class="keyword">using</span> std::chrono::duration_cast;</div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;    <span class="keyword">using</span> std::chrono::seconds;</div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;    <span class="keyword">auto</span> duration = tp.time_since_epoch();</div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;    <span class="keyword">auto</span> secs = duration_cast&lt;seconds&gt;(duration);</div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;    <span class="keywordflow">return</span> duration_cast&lt;ToDuration&gt;(duration) - duration_cast&lt;ToDuration&gt;(secs);</div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;}</div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160; </div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;} <span class="comment">// namespace fmt_helper</span></div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;} <span class="comment">// namespace details</span></div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;} <span class="comment">// namespace spdlog</span></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<div class="ttc" id="anamespacefmt_1_1v5_html_a253206334a77520a94a72af63516dabd"><div class="ttname"><a href="namespacefmt_1_1v5.html#a253206334a77520a94a72af63516dabd">fmt::v5::format_to</a></div><div class="ttdeci">std::enable_if&lt; is_contiguous&lt; Container &gt;::value &amp;&amp;internal::is_string&lt; S &gt;::value, std::back_insert_iterator&lt; Container &gt; &gt;::type format_to(std::back_insert_iterator&lt; Container &gt; out, const S &amp;format_str, const Args &amp;... args)</div><div class="ttdef"><b>Definition:</b> <a href="core_8h_source.html#l01430">core.h:1430</a></div></div>
<div class="ttc" id="aclassfmt_1_1v5_1_1basic__memory__buffer_html"><div class="ttname"><a href="classfmt_1_1v5_1_1basic__memory__buffer.html">fmt::v5::basic_memory_buffer</a></div><div class="ttdef"><b>Definition:</b> <a href="format_8h_source.html#l00464">format.h:464</a></div></div>
<div class="ttc" id="aclassfmt_1_1v5_1_1basic__string__view_html"><div class="ttname"><a href="classfmt_1_1v5_1_1basic__string__view.html">fmt::v5::basic_string_view&lt; char &gt;</a></div></div>
<div class="ttc" id="acommon_8h_html_a15d2dc432e6bb83beb5130be9a4ca8d6"><div class="ttname"><a href="common_8h.html#a15d2dc432e6bb83beb5130be9a4ca8d6">SPDLOG_NOEXCEPT</a></div><div class="ttdeci">#define SPDLOG_NOEXCEPT</div><div class="ttdef"><b>Definition:</b> <a href="common_8h_source.html#l00035">common.h:35</a></div></div>
<div class="ttc" id="anamespacespdlog_1_1details_1_1fmt__helper_html_a603f4d0d8853a61610a0042d5d62fe94"><div class="ttname"><a href="namespacespdlog_1_1details_1_1fmt__helper.html#a603f4d0d8853a61610a0042d5d62fe94">spdlog::details::fmt_helper::append_string_view</a></div><div class="ttdeci">void append_string_view(spdlog::string_view_t view, fmt::basic_memory_buffer&lt; char, Buffer_Size &gt; &amp;dest)</div><div class="ttdef"><b>Definition:</b> <a href="fmt__helper_8h_source.html#l00030">fmt_helper.h:30</a></div></div>
<div class="ttc" id="aclassfmt_1_1v5_1_1internal_1_1basic__buffer_html_ac4761deba75a7238ae29243b159b9943"><div class="ttname"><a href="classfmt_1_1v5_1_1internal_1_1basic__buffer.html#ac4761deba75a7238ae29243b159b9943">fmt::v5::internal::basic_buffer::size</a></div><div class="ttdeci">std::size_t size() const</div><div class="ttdef"><b>Definition:</b> <a href="core_8h_source.html#l00250">core.h:250</a></div></div>
<div class="ttc" id="aclassfmt_1_1v5_1_1internal_1_1basic__buffer_html_a5c6d1a6230a4c8e713244bbdd63a1a24"><div class="ttname"><a href="classfmt_1_1v5_1_1internal_1_1basic__buffer.html#a5c6d1a6230a4c8e713244bbdd63a1a24">fmt::v5::internal::basic_buffer::append</a></div><div class="ttdeci">void append(const U *begin, const U *end)</div><div class="ttdef"><b>Definition:</b> <a href="format_8h_source.html#l00394">format.h:394</a></div></div>
<div class="ttc" id="anamespacespdlog_1_1details_1_1fmt__helper_html_a569553750f9f2fa7b16c94a56a398de3"><div class="ttname"><a href="namespacespdlog_1_1details_1_1fmt__helper.html#a569553750f9f2fa7b16c94a56a398de3">spdlog::details::fmt_helper::pad_uint</a></div><div class="ttdeci">void pad_uint(T n, unsigned int width, fmt::basic_memory_buffer&lt; char, Buffer_Size &gt; &amp;dest)</div><div class="ttdef"><b>Definition:</b> <a href="fmt__helper_8h_source.html#l00077">fmt_helper.h:77</a></div></div>
<div class="ttc" id="anamespacespdlog_1_1details_1_1fmt__helper_html_aad467c706932b56929dae091b39c23f3"><div class="ttname"><a href="namespacespdlog_1_1details_1_1fmt__helper.html#aad467c706932b56929dae091b39c23f3">spdlog::details::fmt_helper::pad9</a></div><div class="ttdeci">void pad9(T n, fmt::basic_memory_buffer&lt; char, Buffer_Size &gt; &amp;dest)</div><div class="ttdef"><b>Definition:</b> <a href="fmt__helper_8h_source.html#l00102">fmt_helper.h:102</a></div></div>
<div class="ttc" id="anamespacespdlog_1_1details_1_1fmt__helper_html_a27585b20ce58cd861f4e37be0057cc41"><div class="ttname"><a href="namespacespdlog_1_1details_1_1fmt__helper.html#a27585b20ce58cd861f4e37be0057cc41">spdlog::details::fmt_helper::time_fraction</a></div><div class="ttdeci">ToDuration time_fraction(const log_clock::time_point &amp;tp)</div><div class="ttdef"><b>Definition:</b> <a href="fmt__helper_8h_source.html#l00111">fmt_helper.h:111</a></div></div>
<div class="ttc" id="aclassfmt_1_1v5_1_1internal_1_1basic__buffer_html_a384f1304da6ce18c4713368327354479"><div class="ttname"><a href="classfmt_1_1v5_1_1internal_1_1basic__buffer.html#a384f1304da6ce18c4713368327354479">fmt::v5::internal::basic_buffer::data</a></div><div class="ttdeci">T * data()</div><div class="ttdef"><b>Definition:</b> <a href="core_8h_source.html#l00256">core.h:256</a></div></div>
<div class="ttc" id="aclassfmt_1_1v5_1_1internal_1_1basic__buffer_html_a8e3b65c01dadb977b9c2327864db9e15"><div class="ttname"><a href="classfmt_1_1v5_1_1internal_1_1basic__buffer.html#a8e3b65c01dadb977b9c2327864db9e15">fmt::v5::internal::basic_buffer::push_back</a></div><div class="ttdeci">void push_back(const T &amp;value)</div><div class="ttdef"><b>Definition:</b> <a href="core_8h_source.html#l00278">core.h:278</a></div></div>
<div class="ttc" id="anamespacespdlog_html_af48e310b2f366ac6544701e6a3b56247"><div class="ttname"><a href="namespacespdlog.html#af48e310b2f366ac6544701e6a3b56247">spdlog::string_view_t</a></div><div class="ttdeci">fmt::string_view string_view_t</div><div class="ttdef"><b>Definition:</b> <a href="common_8h_source.html#l00088">common.h:88</a></div></div>
<div class="ttc" id="anamespacespdlog_html"><div class="ttname"><a href="namespacespdlog.html">spdlog</a></div><div class="ttdef"><b>Definition:</b> <a href="async_8h_source.html#l00027">async.h:27</a></div></div>
<div class="ttc" id="aclassfmt_1_1v5_1_1basic__string__view_html_abd82d74b110d5d4f52e0282e4d11fc99"><div class="ttname"><a href="classfmt_1_1v5_1_1basic__string__view.html#abd82d74b110d5d4f52e0282e4d11fc99">fmt::v5::basic_string_view::size</a></div><div class="ttdeci">size_t size() const</div><div class="ttdef"><b>Definition:</b> <a href="core_8h_source.html#l00389">core.h:389</a></div></div>
<div class="ttc" id="anamespacespdlog_1_1details_1_1fmt__helper_html_a0d2621043fa718e54ffcaa2e9812dfa4"><div class="ttname"><a href="namespacespdlog_1_1details_1_1fmt__helper.html#a0d2621043fa718e54ffcaa2e9812dfa4">spdlog::details::fmt_helper::append_int</a></div><div class="ttdeci">void append_int(T n, fmt::basic_memory_buffer&lt; char, Buffer_Size &gt; &amp;dest)</div><div class="ttdef"><b>Definition:</b> <a href="fmt__helper_8h_source.html#l00040">fmt_helper.h:40</a></div></div>
<div class="ttc" id="anamespacespdlog_1_1details_1_1fmt__helper_html_ae8d7b70c5b54338c0903cf494b06404a"><div class="ttname"><a href="namespacespdlog_1_1details_1_1fmt__helper.html#ae8d7b70c5b54338c0903cf494b06404a">spdlog::details::fmt_helper::pad2</a></div><div class="ttdeci">void pad2(int n, fmt::basic_memory_buffer&lt; char, Buffer_Size &gt; &amp;dest)</div><div class="ttdef"><b>Definition:</b> <a href="fmt__helper_8h_source.html#l00054">fmt_helper.h:54</a></div></div>
<div class="ttc" id="aclassfmt_1_1v5_1_1format__int_html_afde6e35fd703a48b346c0dd969bd6b1c"><div class="ttname"><a href="classfmt_1_1v5_1_1format__int.html#afde6e35fd703a48b346c0dd969bd6b1c">fmt::v5::format_int::data</a></div><div class="ttdeci">const char * data() const</div><div class="ttdef"><b>Definition:</b> <a href="format_8h_source.html#l02870">format.h:2870</a></div></div>
<div class="ttc" id="anamespacespdlog_1_1details_1_1fmt__helper_html_a1cd64e7ba833d726c77344aa9fb85e6a"><div class="ttname"><a href="namespacespdlog_1_1details_1_1fmt__helper.html#a1cd64e7ba833d726c77344aa9fb85e6a">spdlog::details::fmt_helper::append_buf</a></div><div class="ttdeci">void append_buf(const fmt::basic_memory_buffer&lt; char, Buffer_Size1 &gt; &amp;buf, fmt::basic_memory_buffer&lt; char, Buffer_Size2 &gt; &amp;dest)</div><div class="ttdef"><b>Definition:</b> <a href="fmt__helper_8h_source.html#l00023">fmt_helper.h:23</a></div></div>
<div class="ttc" id="aclassfmt_1_1v5_1_1basic__string__view_html_a517e9e8fc58c52c7816fa647d5e69f9f"><div class="ttname"><a href="classfmt_1_1v5_1_1basic__string__view.html#a517e9e8fc58c52c7816fa647d5e69f9f">fmt::v5::basic_string_view::data</a></div><div class="ttdeci">const Char * data() const</div><div class="ttdef"><b>Definition:</b> <a href="core_8h_source.html#l00386">core.h:386</a></div></div>
<div class="ttc" id="aclassfmt_1_1v5_1_1format__int_html_abe5d90acec7245e6cd0c5d49b4e57f3e"><div class="ttname"><a href="classfmt_1_1v5_1_1format__int.html#abe5d90acec7245e6cd0c5d49b4e57f3e">fmt::v5::format_int::size</a></div><div class="ttdeci">std::size_t size() const</div><div class="ttdef"><b>Definition:</b> <a href="format_8h_source.html#l02862">format.h:2862</a></div></div>
<div class="ttc" id="aclassfmt_1_1v5_1_1format__int_html"><div class="ttname"><a href="classfmt_1_1v5_1_1format__int.html">fmt::v5::format_int</a></div><div class="ttdef"><b>Definition:</b> <a href="format_8h_source.html#l02813">format.h:2813</a></div></div>
<div class="ttc" id="anamespacespdlog_1_1details_1_1fmt__helper_html_a976eeb3c4a42ccfb05437aa9a0d4d9f7"><div class="ttname"><a href="namespacespdlog_1_1details_1_1fmt__helper.html#a976eeb3c4a42ccfb05437aa9a0d4d9f7">spdlog::details::fmt_helper::count_digits</a></div><div class="ttdeci">unsigned count_digits(T n)</div><div class="ttdef"><b>Definition:</b> <a href="fmt__helper_8h_source.html#l00047">fmt_helper.h:47</a></div></div>
<div class="ttc" id="anamespacefmt_1_1v5_1_1internal_html_af8b98afef956b03a99bc61d088705f13"><div class="ttname"><a href="namespacefmt_1_1v5_1_1internal.html#af8b98afef956b03a99bc61d088705f13">fmt::v5::internal::type</a></div><div class="ttdeci">type</div><div class="ttdef"><b>Definition:</b> <a href="core_8h_source.html#l00530">core.h:530</a></div></div>
<div class="ttc" id="anamespacespdlog_1_1details_1_1fmt__helper_html_af739ecce102d47ff08a0f344a96897d9"><div class="ttname"><a href="namespacespdlog_1_1details_1_1fmt__helper.html#af739ecce102d47ff08a0f344a96897d9">spdlog::details::fmt_helper::pad3</a></div><div class="ttdeci">void pad3(T n, fmt::basic_memory_buffer&lt; char, Buffer_Size &gt; &amp;dest)</div><div class="ttdef"><b>Definition:</b> <a href="fmt__helper_8h_source.html#l00090">fmt_helper.h:90</a></div></div>
<div class="ttc" id="anamespacespdlog_1_1details_1_1fmt__helper_html_aefae60b1ebdae78bc8f11c26b36b2cd6"><div class="ttname"><a href="namespacespdlog_1_1details_1_1fmt__helper.html#aefae60b1ebdae78bc8f11c26b36b2cd6">spdlog::details::fmt_helper::pad6</a></div><div class="ttdeci">void pad6(T n, fmt::basic_memory_buffer&lt; char, Buffer_Size &gt; &amp;dest)</div><div class="ttdef"><b>Definition:</b> <a href="fmt__helper_8h_source.html#l00096">fmt_helper.h:96</a></div></div>
<div class="ttc" id="anamespacespdlog_1_1details_1_1fmt__helper_html_aa2b4191cb8c40474fb61787ad67face5"><div class="ttname"><a href="namespacespdlog_1_1details_1_1fmt__helper.html#aa2b4191cb8c40474fb61787ad67face5">spdlog::details::fmt_helper::to_string_view</a></div><div class="ttdeci">spdlog::string_view_t to_string_view(const fmt::basic_memory_buffer&lt; char, Buffer_Size &gt; &amp;buf) SPDLOG_NOEXCEPT</div><div class="ttdef"><b>Definition:</b> <a href="fmt__helper_8h_source.html#l00017">fmt_helper.h:17</a></div></div>
<div class="ttc" id="afmt_8h_html"><div class="ttname"><a href="fmt_8h.html">fmt.h</a></div></div>
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_5f1136fe404e0a548faf586fae339a6a.html">sdk_core</a></li><li class="navelem"><a class="el" href="dir_fef6b6f1028f30fedf17225feaaa02fe.html">include</a></li><li class="navelem"><a class="el" href="dir_7bb3e31efd6b819bbb0704cee4a66d41.html">third_party</a></li><li class="navelem"><a class="el" href="dir_cf58c3a45797022668a1e269b5315a33.html">spdlog</a></li><li class="navelem"><a class="el" href="dir_248a80cf6760c7a1ab13394a1c16f7b2.html">spdlog</a></li><li class="navelem"><a class="el" href="dir_7d093cd833acfccb787639923feedd9d.html">details</a></li><li class="navelem"><a class="el" href="fmt__helper_8h.html">fmt_helper.h</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.16 </li>
  </ul>
</div>
</body>
</html>
